<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>最大值</title>
</head>
<body>
<div id="myclock"></div>
<script type="text/javascript">
    function max(x,y,z){
  var max = x;
  if(y>max) max = y;
  if(z>max) max = z;
  return max;
}
var result = max(2,30,99);
alert("最大值是"+result);

</script>
</body>
</html>
